package com.gastronomy.service;

import java.util.List;
import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.gastronomy.entity.User;

public interface UserService {

	/**
	 * 新增用户
	 * @param user
	 * @return
	 */
	public Map<String, String> addUser(User user, String roleId, String password2, MultipartFile picFile);

	/**
	 * 用户登录
	 * @param user
	 * @return
	 */
	public Map<String, String> queryUser(User user);

	/**
	 * 查询用户
	 * @param id
	 * @return
	 */
	public User queryUserById(String id);

	/**
	 * 管理员查询所有的用户，不包含管理员
	 * @param roleTypes 
	 * @return
	 */
	public List<User> listUsers(Integer[] roleTypes);

	/**
	 * 批量冻结用户
	 * @param ids
	 * @param user
	 * @return
	 */
	public Map<String, String> lockUser(String ids, User user);
	
	public Map<String, String> unLockUser(String ids, User user);
	
	public List<User> sortBusiness(String type, String sortType, String nickName, String currentPage, int pageSize);

	public User getUserByLoginName(String loginName);

}
